﻿using System.ComponentModel.DataAnnotations;
using EmployeesManager.Poco;

namespace EmployeesManager.Models
{
    public class EmployeeForm
    {
        public int Id { get; set; }
        [Required]
        public string Name { get; set; }
        public string Title { get; set; }
        [Range(18, 80, ErrorMessage = "Age must be a number between 18 and 80")]
        public int Age { get; set; }
        [Range(1000, 1000000, ErrorMessage = "Age must be a number between 1000 and 1000000")]
        public double Salary { get; set; }
        public int? ManagerId { get; set; }
        public Employee Manager { get; set; } 
    }
}